package com.wanglibao.woodtrade.woodtrade.ui.activity.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * Created by zy on 2016/5/17.
 */
public class VPFragmentAdapter extends FragmentPagerAdapter {
    Fragment[]mFragments;
    public VPFragmentAdapter(FragmentManager fm,Fragment[]fragments) {
        super(fm);
        this.mFragments=fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments[position];
    }

    @Override
    public int getCount() {
        return mFragments.length;
    }
}
